﻿namespace JxcLite.Pages.Inventory;

/// <summary>
/// 商品库存表页面。
/// </summary>
[StreamRendering]
[Route("/wms/GoodsInventory")]
public class GoodsInventory : BaseTablePage<InventoryInfo>
{
    private IInventoryService Service;

    protected override async Task OnInitPageAsync()
    {
        await base.OnInitPageAsync();
        Service = await CreateServiceAsync<IInventoryService>();
        Table.OnQuery = Service.QueryInventoriesAsync;
    }

    public async void Export() => await Table.ExportDataAsync();
}